<template>
    <div>
        <el-menu-item :index="item.menuPath" v-if="!item.chrilds">
            <span slot="title">{{item.menuName}}</span>
        </el-menu-item>
             <el-submenu :index="item.menuPath" v-else>
                 <template slot="title">
                     <i class="el-icon-location"></i>
                     <span>{{item.menuName}}</span>
                 </template>

                 <template v-for="child in item.chrilds">
                    <NavItem  v-if="child.effective==1" :key="child.menuPath" :item="child" />
                 </template>
             </el-submenu>

    </div>
</template>

<script>

    export default {
        name: "NavItem",
        data() {
            return {
                items:[],
            }
        },
        props:['item'],
    }
</script>
